Enhance client_os reporting for vertica-nodejs #159
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This MR enhances the client_os value reported by the Vertica Node.js driver in session information.
Instead of returning generic values such as linux or win32, the driver now reports a detailed and meaningful OS string, consistent with other Vertica client drivers (vertica-python, ODBC, JDBC).
Problem Statement
Currently, when connecting using vertica-nodejs, the client_os field contains only basic OS identifiers.
Customers expect richer OS information in v_monitor.sessions, similar to what is provided by other supported drivers.
Solution
Updated client_os to include OS type, release, and architecture.
Added robust fallback handling:
Falls back to os.platform() if detailed OS retrieval fails.
Uses "unknown" if all OS lookups fail.
Ensured output consistency with other Vertica client drivers.
Changes Included
connection-parameters.js

Enhanced client_os construction with detailed OS information and fallback logic.
Integration test update
Updated expectations to validate the new client_os format.
New unit tests
Added coverage for:
Detailed OS reporting
Fallback to os.platform()
Final fallback to "unknown"